import logging,yagmail
class Tools():
    def rizhi(self):
        rizhi=logging.basicConfig(filename='./baidu.log',
                            level=logging.DEBUG,
                            filemode='w+',
                            format='%(asctime)s->%(levelname)s->%(message)s')
        return rizhi
    def emil_send(self):
        emil = yagmail.SMTP(host='stmp.qq.com',user='2410811597@qq.com',password='uzwlvaboffeqecfh')
        emil.send(to='2410811597@qq.com',subject='百度测试',contents='百度高级搜索测试',attachments=['./baidu.log'])